Optimal frequency of modulo operation in finite field arithmetic implementation